home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
utils
/
cleo.arc
/
CLEO.DOC
next >
Wrap
Text File
|
1989-09-19
|
6KB
|
102 lines
CLEO (Command Line Editing Otherwise) is a TSR (Terminate and Stay
Resident) program to be placed in the boot device's AUTO folder.
It replaces the GEMDOS function Cconrs (READSTRING) by a more advanced
editing capability (if in/output is not being redirected). It
includes a history mechanism, filename completion, cursor movement.
All programs that use Cconrs in some way or another can make good use
of it (notably some shells). Often standard library functions like
gets() are implemented through Cconrs (e.g. Lattice C).
Some remarks:
a) CLEO tries to keep track of the prompt string, that is: whenever
the current input buffer needs to be redisplayed on a new line, the
prompt before the input buffer is being redisplayed too (if possible).
b) CLEO uses a warning bell to indicate a possible error (cannot move,
cannot delete, no files found/matched, cannot recall). This bell can be
disabled.
c) The current buffer can extend over several physical lines. A
restriction implied by GEMDOS is that it can contain at most 255
characters.
d) Currently CLEO grabs about 14 K of your free memory. This includes
space for 20 255-byte buffers.
A detailed description of the function keys in CLEO will be given now:
HELP Displays the function keys of CLEO in a compressed way.
The current buffer is redisplayed after the help text.
CURSOR LEFT Move the cursor to the left throught the current buffer.
Ring the warning bell if at the start of the buffer.
CURSOR RIGHT Move the cursor to the right throught the current buffer.
Ring the warning bell if at the end of the buffer.
CURSOR UP Move up in the history. Each time an older buffer is being
displayed (there can be up to 20 history buffers). After
the last one the current buffer is cleared again.
CURSOR DOWN Move down in the history. Each time a more recent buffer
is being displayed.
CLRHOME Either recalls a history buffer into the current buffer,
or shows all the history buffers. If the current buffer
is empty, all history buffers are shown, in reverse order
(the most recent one last, numbered 1). If it starts with
a number, it is taken to be the history buffer's number.
If it is a string, the history buffers are searched for a
(prefix) match (starting with the most current one). In
the latter two cases, if a matching history buffer is
found the current buffer is filled with that buffer;
otherwise the warning bell is rung.
UNDO Toggles literalness/interpretation of control characters
(including Escape, Return and Backspace). In literal mode
a control character's function is not performed, but the
character is entered literally into the buffer. This mode
is always reset to interpreted for the next call.
INSERT Toggle insert/replace mode for characters. Standard is
insert mode: characters to the right of the cursor are
being shifted to the right when new characters are being
entered. In replace mode newly typed characters replace
the ones already there (characters are not being shifted).
This mode is preserved (remembered) for the next call.
DELETE Delete the character at the cursor. Ring the warning bell
if at the end of the current buffer.
CONTROL A Move cursor to the beginning of the current buffer. Ring
the warning bell if already there.
CONTROL B Move cursor to the beginning of the word preceding the
cursor. Ring the warning bell if at the start of the
current buffer.
CONTROL C Stop the current program (exitcode -32).
CONTROL D List the files whose names match the word before the
cursor, sorted by name. If this word contains a
directory specification, a file's name must match this
directory completely (the file must reside in that
directory). In this case the directory specification
of the word must end in a \. Ring the warning bell if
no files matched.
ESCAPE Like Control D, only now don't show the files, but
insert(/replace) at the cursor the common part of the
matching files' names (e.g. complete the file name as
far as it is uniquely identifiable). Ring the warning
bell if there was not a single match.
CONTROL E Move cursor to the end of the current buffer. Ring the
warning bell if already there.
CONTROL F Move cursor to the beginning of the next word. Ring the
warning bell if already at the end of the current buffer.
CONTROL G Toggle to disable/enable the warning bell. This toggle's
value is preserved (remembered) for the next call.
CONTROL H
BACKSPACE Delete the character before the cursor. Ring the warning
bell if already at the start of the current buffer.
CONTROL J
CONTROL M End of input. For compatibility with GEMDOS a carriage
return is printed, and the character is not entered into
the current buffer (the cursor is first moved to the end
of the current buffer if not already there). The input
is also ended when the max. count is reached (whose value
was passed by the user as the value of the first char in
the buffer.
CONTROL L
CONTROL R Redisplay the current buffer.
CONTROL U Clear the current buffer.
CONTROL W Delete the word preceding the cursor.
CONTROL X Delete through the start of the current buffer.